<!--

    This file is part of kanji-portal.com.

    kanji-portal.com is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    kanji-portal.com is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with kanji-portal.com.  If not, see <http://www.gnu.org/licenses/>.

    Copyright (c) 2008-2009 Nicolas Radde <nicolas@radde.org>

-->
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:a="http://richfaces.org/a4j"
                xmlns:s="http://jboss.com/products/seam/taglib"
                template="#{theme.template}">

    <!-- content -->
    <ui:define name="content">
        <a:outputPanel id="distionarySection">
            <fieldset>
                <legend>Mot de vocabulaire</legend>
                <div class="section">
                    <ui:repeat var="trans" value="#{entry.translations}">
                        <a:outputPanel rendered="#{trans.language.codeIso63901 == localeSelector.language}">
                            #{trans.dictionary.kanji} <h:outputText rendered="#{trans.dictionary.kana != null}"
                                                                    value=" 「#{trans.dictionary.kana.replace('.', '')}」"/> : #{trans.description.replace("|", "; ")}. #{trans.detail}
                            <a:outputPanel rendered="#{trans.note} != null">
                                <label>Notes:</label>
                                #{trans.note}
                            </a:outputPanel>
                        </a:outputPanel>
                    </ui:repeat>
                </div>
            </fieldset>
            <fieldset>
                <legend>Tags</legend>
                <div class="section">
                    <h:outputText value="No Tags Found"
                                  rendered="#{dictionnaryTags != null and dictionnaryTags.rowCount==0}"/>
                    <ui:repeat value="#{dictionnaryTags}" var="link">
                        #{link.tag.name}
                        <br/>
                    </ui:repeat>
                </div>
            </fieldset>
        </a:outputPanel>

    </ui:define>

</ui:composition>
